#include <stdio.h>

typedef enum { false, true } boolean;

boolean isBlank(char c);
/* prient input, one word per line */
int main()
   {
	char c;
	  boolean last_line_was_blank = false;
       while ((c = getchar()) != EOF)
	  {
	    if (!last_line_was_blank && isBlank(c))
		 {
		   putchar('\n');
		   last_line_was_blank=true;
		 }
         if (!isBlank(c))
	    {
		 putchar(c);
		 last_line_was_blank=false;
	    }
       }
   return 0;  
  }

boolean isBlank(char c)
{
  if (c==' ')
    return true;
  if (c=='\n')
    return true;
  if (c=='\t')
    return true;
  return false;
} 
